#ifndef _DNSIMPL_H_
#define _DNSIMPL_H_

#include "stdafx.h"

class CDnsImpl :	public	IDns,
					public	IOperationEvent,
					public	CUnknownImp
{
public:
	CDnsImpl();
	virtual ~CDnsImpl(void);

public:
	BEGIN_STDCOM_MAP
		STDCOM_INTERFACE_ENTRY_UNKNOWN_(IDns);
		STDCOM_INTERFACE_ENTRY(IDns);
		STDCOM_INTERFACE_ENTRY(IOperationEvent);
	END_STDCOM_MAP

	std_method_impl init_class(AsynFrameConstPtr AsynFrame, NetConstPtr Net);

	//IDns
	std_method(Send)(LPCSTR hostname, IBase* pProc);
	std_method(Post)(LPCSTR hostname, IBase* pProc);
	std_method(Close)();

	//IIoOperationEvents
	std_method(OnComplete)(IBase *pOperation, event_id event, ULONG error_code);

private:
	UdpSocketPtr		m_pISocket;
	OperationPtr		m_pIOperation;
	CSemHandle			m_sem;
};

#endif
